﻿@using Weapsy.Reporting.Apps
@model Weapsy.Reporting.Apps.ModuleTypeAdminModel

<div class="form-group has-feedback">
    <label for="app" class="col-md-2 control-label">App</label>
    <div class="col-md-4">
        <input id="originalApp" type="hidden" value="@Model.AppId">
        <select id="appId" name="appId" class="form-control">
            @foreach (var app in Model.AvailableApps)
            {
                <option value="@app.Id">@app.Name</option>
            }            
        </select>
        <i class="form-control-feedback glyphicon"></i>
    </div>
    <div class="col-md-6 help-block">
        <label id="app-error" for="app" class="text-danger" style="display:none;"></label>
    </div>
</div>

<div class="form-group has-feedback">
    <label for="name" class="col-md-2 control-label">Name</label>
    <div class="col-md-4">
        <input id="originalName" type="hidden" value="@Model.Name">
        <input id="name" name="name" type="text" class="form-control" placeholder="Enter Name" value="@Model.Name">
        <i class="form-control-feedback glyphicon"></i>
    </div>
    <div class="col-md-6 help-block">
        <label id="name-error" for="name" class="text-danger" style="display:none;"></label>
    </div>
</div>

<div class="form-group has-feedback">
    <label for="description" class="col-md-2 control-label">Title</label>
    <div class="col-md-4">
        <input id="originalTitle" type="hidden" value="@Model.Title">
        <input id="title" name="title" type="text" class="form-control" placeholder="Enter Title" value="@Model.Title">
        <i class="form-control-feedback glyphicon"></i>
    </div>
    <div class="col-md-6 help-block">
        <label id="title-error" for="description" class="text-danger" style="display:none;"></label>
    </div>
</div>

<div class="form-group has-feedback">
    <label for="description" class="col-md-2 control-label">Description</label>
    <div class="col-md-4">
        <input id="originalDescription" type="hidden" value="@Model.Description">
        <textarea id="description" name="description" type="text" class="form-control" placeholder="Enter Description">@Model.Description</textarea>
        <i class="form-control-feedback glyphicon"></i>
    </div>
    <div class="col-md-6 help-block">
        <label id="description-error" for="description" class="text-danger" style="display:none;"></label>
    </div>
</div>

<div class="form-group has-feedback">
    <label for="viewType" class="col-md-2 control-label">View Type</label>
    <div class="col-md-4">
        <input asp-for="ViewType" type="radio" value="1" />View Component
        <input asp-for="ViewType" type="radio" value="2" />View
        <i class="form-control-feedback glyphicon"></i>
    </div>
    <div class="col-md-6 help-block">
        <label id="viewType-error" for="viewType" class="text-danger" style="display:none;"></label>
    </div>
</div>

<div class="form-group has-feedback">
    <label for="viewName" class="col-md-2 control-label">View Name</label>
    <div class="col-md-4">
        <input id="originalViewName" type="hidden" value="@Model.ViewName">
        <input id="viewName" name="viewName" type="text" class="form-control" placeholder="Enter View Name" value="@Model.ViewName">
        <i class="form-control-feedback glyphicon"></i>
    </div>
    <div class="col-md-6 help-block">
        <label id="viewName-error" for="viewName" class="text-danger" style="display:none;"></label>
    </div>
</div>

<div class="form-group has-feedback">
    <label for="editType" class="col-md-2 control-label">Edit Type</label>
    <div class="col-md-4">
        <input asp-for="EditType" type="radio" value="1" />Modal
        <input asp-for="EditType" type="radio" value="2" />Page
        <i class="form-control-feedback glyphicon"></i>
    </div>
    <div class="col-md-6 help-block">
        <label id="editType-error" for="editType" class="text-danger" style="display:none;"></label>
    </div>
</div>

<div class="form-group has-feedback">
    <label for="editUrl" class="col-md-2 control-label">Edit Url</label>
    <div class="col-md-4">
        <input id="originalEditUrl" type="hidden" value="@Model.EditUrl">
        <input id="editUrl" name="editUrl" type="text" class="form-control" placeholder="Enter Edit Url" value="@Model.EditUrl">
        <i class="form-control-feedback glyphicon"></i>
    </div>
    <div class="col-md-6 help-block">
        <label id="editUrl-error" for="editUrl" class="text-danger" style="display:none;"></label>
    </div>
</div>